print 'PATH', __file__

import sys, os, logging, logging.config



sys.dont_write_bytecode = True
#test_modules = ["test_api"]
test_modules = ["test_listview"]

basedir = os.path.split(__file__)[0]

sys.path.append(basedir + os.sep + 'src')

import settings

#test_modules = ["test_pipelines"]

settings.BASEDIR = basedir
settings.SOURCE = basedir + os.sep + "src"
settings.CONFIG = basedir + os.sep + "config"

settings.LOGGING_CONFIG = settings.CONFIG + os.sep + "logging.cfg"

settings.LOCAL_PATH = os.path.expanduser("~/.ni")

if not os.path.exists(settings.LOCAL_PATH):
    os.makedirs(settings.LOCAL_PATH)

sys.path.append(settings.SOURCE)

print 'PATHS', sys.path

logging.config.fileConfig(settings.LOGGING_CONFIG)

logging.info("Starting NI...")

#import tests.test_database
import initialize
#import tests.test_listview

#__import__('tests', globals(), locals(), test_modules, -1)

#from tests import test_listview